package app.oa.service.impl;

import javax.annotation.Resource;

import org.springframework.transaction.annotation.Transactional;

import app.oa.comm.EntityMap;
import app.oa.dao.EmployeeDao;
import app.oa.domain.Emp;
import app.oa.service.PersonalService;

public class PersonalServiceImpl implements PersonalService {
	@Resource
	private EmployeeDao employeeDao;
	
	@Transactional(readOnly=true)
	@Override
	public Emp login(Emp emp) {
		EntityMap entityMap = new EntityMap(emp)
		.addParam("ename")
		.addParam("epwd");
		emp = employeeDao.getEmpWithParam(entityMap.toMap());
		return emp;
	}
}
